package com.shendu.task.web;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.shendu.task.domain.DepartDoc;
import com.shendu.task.domain.RetVo;
import com.shendu.task.service.DepartService;

@RestController
@RequestMapping("/depart")  
public class DepartController {
	@Autowired
	private DepartService departService;
	/**
	 * 按照用户查找用户
	 * @param task
	 * @return 
	 */
	@RequestMapping("/list")  
	public RetVo listByUserId(DepartDoc departDoc) {
		List<DepartDoc> list = departService.list(departDoc);
		return new RetVo(list);
	}
	@RequestMapping("/add")  
	public void add( DepartDoc departDoc) {
		departService.add(departDoc);
	}
}
